
<extend name="Public/layout"/>
<block name="head">
<link rel="stylesheet" href="__PUBLIC__css/new--fanli.css">
<script src="__PUBLIC__js/circle.js"></script>
<style type="text/css">

</style>
</block>
<block name="main">
   <div class="area-slide"></div>
    <section class="nav">
        <ul class="retrie">
            <li class="select"><span>理财返利</span><i></i></li>
            <li><a href="/Home/circle/rank_list">网贷排名</a></li>
        </ul>
        <div class="area">
            <ul class="slide">
                <li class="" attr_order="1"><a href="javascript:">首投最高</a></li>
                <li attr_order="2"><a href="javascript:">最新上线</a></li>
                <li attr_order="3"><a href="javascript:">热门推荐</a></li>
                <li attr_order="4"><a href="javascript:">复投加息</a></li>
            </ul>
        </div>
    </section>
    <section class="plan-pro">
      <foreach name="list" item="v">
        <a href="/Home/Circle/circle_info/id/{$v.id}">
            <div class="plan-pro-item">
                <div class="plan-pro-top">
                    <div class="pro-top-left">
                        <img src="{$v.wx_square_logo}?x-oss-process=image/resize,w_236" alt="">
                    </div>
                    <div class="pro-top-rigth">
                        <div class="top-right-title">{$v.name}</div>
                        <div class="top-right-info">
                            <span>{$v.circle.background}</span>
                            <span>{$v.circle.deposit}</span>
                            <span>{$v.circle.online}</span>
                            <span>历史兑付率：{$v.circle.conversion}%</span>
                        </div>
                    </div>
                </div>
                <div class="plan-pro-bottom">
                    <div class="pro-bottom-left">
                        <dd><i>{$v.user_award}</i>元</dd>
                        <dd>首投最高返利</dd>
                    </div>
                    <div class="pro-bottom-left">
                        <dd><i>{:ceil($v['start_amount'])}</i>元</dd>
                        <dd>起投金额</dd>
                    </div>
                    <div class="pro-bottom-right">投资拿返利</div>
                </div>
            </div>
        </a>
      </foreach>
  
    </section>
</block>
<block name="js">

    <script type="text/javascript">
$(function(){
    // 导航切换
    $('.retrie >.select').click(function(){
        if($(this).hasClass('select-i')){
            $(this).removeClass('select-i');
        }else{
            $(this).addClass('select-i').siblings().removeClass('select-i');            
        }
        $('.area-slide').toggle();
        $('.area').toggle();  
    });
    $('.area>.slide>li').click(function () {
        if ($(this).hasClass('slide-select')) {
            $(this).removeClass('slide-select');
        } else {
            $(this).addClass('slide-select').siblings().removeClass('slide-select');

        }
         $('.retrie >.select').click();

         var order = $(this).attr('attr_order');
         switch(order){
            case "1":
            $('.retrie >.select').find('span').text("首投最高")
            break;
             case "2":
            $('.retrie >.select').find('span').text("最新上线")
            break;
             case "3":
            $('.retrie >.select').find('span').text("热门推荐")
            break;
             case "4":
            $('.retrie >.select').find('span').text("复投加息")
            break;
         }
         console.log(order)
         if(order){
            $.post('/Home/Financial/index',{
              order:order
            },function(res){
                $('.plan-pro').html(res.content);
            })
         }
    });    
});
    </script>
</block>